Alex Williamson [Mon, 11 Jun 2007 17:05:27 +0000 (11:05 -0600)]
[IA64] Avoid use of kernel type in user code.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 11 Jun 2007 17:02:05 +0000 (11:02 -0600)]
[IA64] Fix p2m exposure.
p2m table page doesn't belong to any domain so that special handling required.
Instead, dom_p2m is introduced and make all p2m page belong to dom_p2m.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Wed, 6 Jun 2007 15:30:01 +0000 (09:30 -0600)]
[IA64] Set NODES_SHIFT to something a bit more realistic
Signed-off-by: Jes Sorensen <jes@sgi.com>
Alex Williamson [Wed, 6 Jun 2007 15:13:50 +0000 (09:13 -0600)]
[IA64] Fix HVM boot failure
HVM sometimes fails to boot with the message
"Guest nested fault vector=0x5400!".
The cause of this issue is that cr.ifs never be initialized in very
first context switching. To optimize hypercall on HVM, cr.ifs is only
set with the predicate pNonSys(pr5)=1.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Alex Williamson [Wed, 6 Jun 2007 15:10:52 +0000 (09:10 -0600)]
[IA64] Remove vmx_ivt.S debug code.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:17:54 +0000 (14:17 -0600)]
[IA64] Set PADDR_BITS to 48 to match reality and save about 5KB per node.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Alex Williamson [Mon, 4 Jun 2007 20:16:21 +0000 (14:16 -0600)]
[IA64] Use vcpu_get_psr instead of vcpu_get_ipsr_int_state.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:14:35 +0000 (14:14 -0600)]
[IA64] clean-up in ivt.S: remove useless code.
The tests just before the #if VHPT_ENABLED makes the block of code useless.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:12:19 +0000 (14:12 -0600)]
[IA64] hyper_rfi: do not validate vcr.iip anymore.
This is useless: if iip is within the vmm, this will be caught by the mmu.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:10:30 +0000 (14:10 -0600)]
[IA64] Clean-up in ivt.S: remove unused code and pack more.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:03:42 +0000 (14:03 -0600)]
[IA64] Prevent rfi emulation with double un-cover
Recently (CS 13436) rfi hyperprivop was simplified. But as a consequence
rfi emulation with double un-cover is not possible anymore.
Comment priv_rfi and forbid rfi emulation with double un-cover.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 20:00:35 +0000 (14:00 -0600)]
[IA64] Disable more privify code
Conditionally comment two privify code blocks.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Mon, 4 Jun 2007 19:57:08 +0000 (13:57 -0600)]
[IA64] Allow dynamic allocation of dom0 fw_tables
This address Xensource bugzilla #980
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 31 May 2007 20:47:08 +0000 (14:47 -0600)]
[IA64] Fix initialization order for buddy allocator
Fix initialization order of buddy allocator to avoid panic
on machines with multi NUMA node.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Alex Williamson [Thu, 31 May 2007 17:42:40 +0000 (11:42 -0600)]
[IA64] Remove annoying log message
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Alex Williamson [Thu, 31 May 2007 17:40:14 +0000 (11:40 -0600)]
[IA64] Remove GLOBAL_VHPT
It was always defined.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Thu, 31 May 2007 17:37:38 +0000 (11:37 -0600)]
[IA64] Cleanup ivt.S
xen/ivt.S is full of #ifndef XEN conditionnal parts. However they are not
maintained and there is no reason to update with linux ivt.S (very very
different). To make the code more readable I remove the conditional parts.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Thu, 31 May 2007 17:25:46 +0000 (11:25 -0600)]
[IA64] Clear resource structure before using it in allocate_resource().
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Alex Williamson [Thu, 31 May 2007 17:18:50 +0000 (11:18 -0600)]
[IA64] Consolidate non-virtualized PSR bits into macro
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Thu, 31 May 2007 17:05:33 +0000 (11:05 -0600)]
[IA64] vcpu_set_psr added and used by vcpu_rfi.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Thu, 31 May 2007 16:48:48 +0000 (10:48 -0600)]
[IA64] Reimplement vcpu_get_psr.
It now returns the virtualized psr.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Alex Williamson [Thu, 31 May 2007 15:45:46 +0000 (09:45 -0600)]
[IA64] Remove RBS from vcpu_guest_context_regs
We need to address places where this is allocated on the stack before
growing the structure this large.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Fri, 25 May 2007 15:43:21 +0000 (09:43 -0600)]
[IA64] Remove unnecessary pal.h from sparse tree.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Fri, 25 May 2007 15:42:12 +0000 (09:42 -0600)]
[IA64] Remove unnecessary include.
With this patch pal.h becomes same as vanilla.
So we can remove it from sparse tree.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Fri, 25 May 2007 15:40:43 +0000 (09:40 -0600)]
[IA64] Trivial warning fix
contiguous_bitmap_init has implicit declaration
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Fri, 25 May 2007 15:38:09 +0000 (09:38 -0600)]
[IA64] Cleanup warnings for UC accesses to UC|WB pages
This patch cleanup the following warning.
(XEN) mm.c:497:d0 Warning: UC to WB for mpaddr=xxxxxxxx
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Fri, 25 May 2007 15:33:01 +0000 (09:33 -0600)]
[IA64] lindent dom_fw_foo code
Lindent the dom_fw_<foo> code to revert formatting that was done as
part of splitting up the files.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Alex Williamson [Thu, 24 May 2007 22:28:48 +0000 (16:28 -0600)]
[IA64] Quieter Xen boot
Demote a couple more printks to debug level output
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Thu, 24 May 2007 21:54:52 +0000 (15:54 -0600)]
[IA64] memmap: save/restore: support save/restore with domain memmap
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 24 May 2007 21:48:31 +0000 (15:48 -0600)]
[IA64] memmap: save/restore implemented
Implemented XENMEM_maximum_gpfn for domain save/restore with domain memmap.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 24 May 2007 21:43:58 +0000 (15:43 -0600)]
[IA64] Fix assertion in vmx_init_env()
With debug=y (i.e. without NDEBUG), xen/ia64 panics.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 24 May 2007 20:43:14 +0000 (14:43 -0600)]
[IA64] Update efi.c and efi.h to linux-2.6.21
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Alex Williamson [Thu, 24 May 2007 20:20:19 +0000 (14:20 -0600)]
[IA64] Don't scrub pages when on SN2 simulator
Small patch to not call scrub_heap_pages() when running on Medusa.
Can't use the running_on_sim flag for this as that flag impacts too
many other things that make it fail for us.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Alex Williamson [Thu, 24 May 2007 20:16:28 +0000 (14:16 -0600)]
[IA64] Fix ld.s emulation
With this patch,
* XEN correctly emulates ld.s for HVM
* original memory attribute is preserved in vcpu->arch.vtlb
Without this, XEN infrequently calls panic_domain() by mistake for windows.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Alex Williamson [Thu, 24 May 2007 20:13:58 +0000 (14:13 -0600)]
[IA64] SN2 polling console driver
First cut of super simple console driver with polled input support. In
addition switch driver to use ia64_sn_console_putb() post-boot to get
interactive response.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Alex Williamson [Wed, 23 May 2007 16:40:19 +0000 (10:40 -0600)]
[IA64] Trivial whitespace cleanups
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Wed, 23 May 2007 14:51:42 +0000 (08:51 -0600)]
[IA64] free initmem and add __init and __initdata.
ia64 counter part of xen-unstable.hg 15043:
759d924af6d8.
By freeing init area, un/pickle_domain() is broken because
__init_begin < xen_heap_start. This is fixed by introducing xen_pickle_offset.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 20:30:09 +0000 (14:30 -0600)]
[IA64] Fix vpd size
New pal has fixed vpd size issue, so change it to 64K to conform to Spec.
Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Alex Williamson [Mon, 21 May 2007 20:09:27 +0000 (14:09 -0600)]
[IA64] memmap: dump-core: enable ia64 memory map code
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 20:08:19 +0000 (14:08 -0600)]
[IA64] memmap: ia64 domVTi memmap info support
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 20:05:08 +0000 (14:05 -0600)]
[IA64] memmap: make libxc domain builder set up firmware instead of xen
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 20:00:54 +0000 (14:00 -0600)]
[IA64] memmap: remove the unused file, xen/arch/ia64/xen/dom_fw.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:59:38 +0000 (13:59 -0600)]
[IA64] memmap: add necessary definitions
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:55:58 +0000 (13:55 -0600)]
[IA64] memmap: preliminary header file clean up
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:54:39 +0000 (13:54 -0600)]
[IA64] memmap: update Makefile
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:53:34 +0000 (13:53 -0600)]
[IA64] memmap: move pal_call_stub from xenasm.S
Now lives in dom_fw_asm.S to be shared by xen and libxc.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:50:05 +0000 (13:50 -0600)]
[IA64] memmap: split dom_fw_common.c
Split into dom0 builder, domu builder and utility functions.
Introduce wrapper functions which hide xen internal implementations
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:16:01 +0000 (13:16 -0600)]
[IA64] memmap: copy dom_fw.c to dom_fw_common.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 19:14:56 +0000 (13:14 -0600)]
[IA64] memmap: preliminary domain-builder clean up.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 16:10:31 +0000 (10:10 -0600)]
[IA64] memmap: introduce memmap_info_t
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 16:09:33 +0000 (10:09 -0600)]
[IA64] memmap: add IA64_DOM0VP_fpswa_revision hypercall
For ia64 domain builder memmap support
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 03:28:48 +0000 (21:28 -0600)]
[IA64] Fix xen/ia64 save/restore error recovery path.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 21 May 2007 03:23:35 +0000 (21:23 -0600)]
[IA64] Replace mlock()/munlock() in ia64 libxc with un/lock_pages()
For Consistency. Also add some missing unlock_pages().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Wed, 16 May 2007 17:38:48 +0000 (11:38 -0600)]
[IA64] Update struct checker for ia64 changes
This makes use of the union support to work with our new
vcpu_guest_context struct.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Wed, 16 May 2007 17:37:19 +0000 (11:37 -0600)]
[IA64] Fix trivial compiler warning
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Wed, 16 May 2007 16:59:01 +0000 (10:59 -0600)]
merge with xen-unstable.hg
Alex Williamson [Wed, 16 May 2007 16:42:07 +0000 (10:42 -0600)]
[IA64] Fix deadlock of ptc.ga emulation
ptc_ga_remote_func() might be invoked by IPI with a schedule_lock
that is acquired. (e.g., inside of vcpu_migrate())
It will cause a deadlock.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Alex Williamson [Tue, 15 May 2007 21:32:23 +0000 (15:32 -0600)]
[IA64] Optimizations for windows
Windows use region 4 and region 5 for identity mapping.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 14:14:02 +0000 (15:14 +0100)]
[HVM][SVM] Reintroduce ASIDs.
ASIDs partition the physical TLB for SVM. In the current implementation
ASIDs are used to reduce the number of TLB flushes. Each time the
guest's virtual address space changes (e.g. due to an INVLPG,
MOV-TO-{CR3, CR4} operation), instead of flushing the TLB, a new ASID is
assigned. This reduces the number of TLB flushes to at most 1/#ASIDs
(currently 1/64). The biggest advantage is that hot parts of the
hypervisor's code and data remain in the TLB.
From: Sebastian Biemueller <Sebastian.Biemueller@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:50:09 +0000 (10:50 +0100)]
Fix TPM support in HVM domains
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Peter Yang <peisen.yang@intel.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:49:10 +0000 (10:49 +0100)]
xenapi: Small fix to the host.get_name_description call
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:46:43 +0000 (10:46 +0100)]
x86/hvm: HVM_DBG_LOG() cleanup
- make log levels used consistent in a few places
- remove trailing newlines, dots, and commas
- remove explictly specified function names from message text
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:46:03 +0000 (10:46 +0100)]
vmx: remove CSTAR save/restore on VMX
CSTAR is an unused MSR in 64-bit mode on Intel's EM64T, hence there's
no need to save/restore this MSR during context switches. Mimic real
hardware by retaining the value written for eventual guest OS reads.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:43:59 +0000 (10:43 +0100)]
x86/hvm: add logging for hypercalls
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:43:18 +0000 (10:43 +0100)]
x86: fix EFER handling
Introduce a per-CPU shadow of what is currently in EFER, as context
switch code must re-write this MSR so that all guests run with
appropriate EFER.SCE and EFER.NX settings. Remove EFER from the set of
MSRs that VMX deals with in a generic fashion.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:28:28 +0000 (10:28 +0100)]
x86/hvm: hypercall adjustments
- share more code between 32- and 64-bit variants
- properly handle continuations for 32-bit guests on 64-bit hv
- properly handle preemption (this must *not* rely on regs->eip, as
- other code may overwrite the value there by calling
- hvm_store_cpu_guest_regs()
- deny hypercall access when called from guest in vm86 mode, which
requires that ???_guest_x86_mode() make real and vm86 modes distinguishable
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:13:11 +0000 (10:13 +0100)]
x86-64/hvm: pio result storing
Don't clear upper 32 bits on 8- and 16-bit PIO reads.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:12:02 +0000 (10:12 +0100)]
x86: ptwr adjustments
Make sure MFN read from pte is valid before accessing the page info
structure associated with it. Drop guest-to-machine-physical
translation from ptwr code.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:08:20 +0000 (10:08 +0100)]
x86: replace some intpte_t * casts
Don't cast values when other (type safe) mechanisms are available to =
achieve the same effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:03:58 +0000 (10:03 +0100)]
x86: kill unused local variable sh_mapcache
Apparently a leaf-over from pre-3.0.3.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:03:14 +0000 (10:03 +0100)]
tools: check for curl-devel and libxml2-devel
when they are required for LIBXENAPI_BINDINGS.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:01:14 +0000 (10:01 +0100)]
tools: check for libvncserver dependency libraries
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:59:51 +0000 (09:59 +0100)]
64-bit hvm on 32-bit dom0 - ioemu adjustments
Don't mask off data bits when running 64-bit hvm guests on 32-bit dom0.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:54:27 +0000 (09:54 +0100)]
x86: suppress SYSCALL feature for 32on64 guests
since Xen cannot handle it.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:50:36 +0000 (09:50 +0100)]
x86: invalidate_shadow_ldt() should be static
Since invalidate_shadow_ldt() depends on process_deferred_ops() to be
called, it shouldn't be visible outside xen/arch/x86/mm.c.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Alex Williamson [Mon, 14 May 2007 18:54:26 +0000 (12:54 -0600)]
[IA64] White space cleanup in regionreg.h
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 14 May 2007 17:52:01 +0000 (11:52 -0600)]
[IA64] Fix ptc.ga emulation
cset14829(
c42ae7839750) was incomplete.
The region register 0 will be clobbered as follows.
time pcpu0 pcpu1 pcpu2
| vcpu0 vcpu1 idle // assignment of vcpu
V
1.vcpu0 issues ptc.ga
2.vcpu0 sends IPI to vcpu1(pcpu1)
3.vcpu1 migrates from pcpu1 to pcpu2
4.pcpu1 receives IPI of 2 and exec ptc_ga_remote_func()
5.pcpu1 saves and modifies vrr[0]
6.vcpu1(pcpu2) modifies vrr[0]
7.pcpu1 restores vrr[0] // vrr[0] of 6 is lost
Windows will crash due to this issue.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Alex Williamson [Mon, 14 May 2007 17:13:24 +0000 (11:13 -0600)]
[IA64] Compilation fix with CRASH_DEBUG defined.
Update for guest_mode()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Steven Hand [Mon, 14 May 2007 14:19:46 +0000 (15:19 +0100)]
Fix HVM save/restore after upgrade to 0.90.
Signed-off-by: Steven Hand <steven@xensource.com>
Steven Hand [Mon, 14 May 2007 14:16:32 +0000 (15:16 +0100)]
HVM save/restore: handle larger domain ids.
Signed-off-by: Steven Hand <steven@xensource.com>
Keir Fraser [Sun, 13 May 2007 09:04:34 +0000 (10:04 +0100)]
hvm qemu: Fix for masking 64-bit operands broke 32-bit operands with
32-bit qemu. Issue spotted and initial fix provided by Dexuan Cui.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 18:22:24 +0000 (19:22 +0100)]
svm: Simplify asm stub for vmentry/vmexit.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 18:04:35 +0000 (19:04 +0100)]
svm: Avoid VMSAVE/VMLOAD/VMSAVE/VMLOAD sequence on every vmexit/vmentry.
Instead do this only on context switches. In cases where we need
access to state that is only saved to the VMCB on VMSAVE, we track
whether the state is in sync via a per-vcpu flag and VMSAVE on demand.
The context switch code can be further improved:
1. No need to VMLOAD host state if we are switching to another SVM VCPU.
2. No need to VMSAVE host state at all (except once at start of day)
because the registers that are saved do not change (or at least, none
of the ones that matter change).
The performance is improvement is about 650 cycles for a null
hypercall. This reduces the total null-hypercall time for a non-debug
build of Xen down to around 3300 cycles on my AMD X2 system.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 15:24:50 +0000 (16:24 +0100)]
hvm: Fix ACPI shutdown, broken by my previous changeset.
It turns out that although PIIX4 hardware defines the S5 type code to
be 000, all OSes will discover the correct code by evlauating an \_Sx
object in the ACPI DSDT. And we set the type code in that object to be
111.
So this patch keeps the other cleanups made to the piix4acpi.c file,
but switches back to checking for code 111. It also makes it clearer
in both the ioemu code and in the dsdt source code where these magic
numbers come from.
Let's hope noone actually has the true PIIX4 type codes hardcoded
(it's highly doubtful that anyone would).
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:46:26 +0000 (12:46 +0100)]
vmx: Replace pointless test-then-set with set.
Spotted by Eddie Dong.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:44:20 +0000 (12:44 +0100)]
xend: configuration option 'localtime = 1' is not honored for PV domains.
This patch fixes an oversight when platform_* config options were
collected in a dictionary.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Sat, 12 May 2007 11:43:16 +0000 (12:43 +0100)]
xen: Fix struct-size checker for unions and long names.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Keir Fraser [Sat, 12 May 2007 11:41:40 +0000 (12:41 +0100)]
hvm qemu: Fix write parameter masking for 64-bit guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:37:51 +0000 (12:37 +0100)]
xen: Better handling on not-present PDEs in destroy_xen_mappings().
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:07:01 +0000 (12:07 +0100)]
x86: Improve zap_low_mappings.
Do it earlier on x86/64, properly free non-superpages on x86/32, and
leave a mapping of the boot trampoline (0x90000-0xA0000) in place.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 09:28:53 +0000 (10:28 +0100)]
xen: Free initmem after boot. Mark lots of init functions as __init
that weren't before.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 08:48:33 +0000 (09:48 +0100)]
hvm: Fix emulation of PIIX4 PMCNTRL register for soft power-off.
The type code needs to be 000, not 111 (which is a reserved value).
Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Fri, 11 May 2007 19:15:53 +0000 (13:15 -0600)]
[IA64] get guest os type
This patch is to use GFW ACPI_OSI to identify guest OS type.
When ACPI_OSI gets OS type, it writes to a reserved port a
special val. then XEN can know the guest OS type.
NB. Linux returns true both for _OSI(linux) and _OSI(windows)
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Alex Williamson [Fri, 11 May 2007 19:09:12 +0000 (13:09 -0600)]
[IA64] Fix allocate_rid_range()
Though there is a free ridblock_owner[], allocate_rid_range()
cannot allocate it.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Alex Williamson [Fri, 11 May 2007 19:07:04 +0000 (13:07 -0600)]
[IA64] Return ENOMEM if VPD allocation failed
Usually ASSRET() is "(void)0". Therefore if VPD allocation
fails with xenheap shortage or fragmentation, NULL pointer
access occurs in vmx_final_setup_guest().
This patch fixes it.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Christian Limpach [Fri, 11 May 2007 09:07:06 +0000 (10:07 +0100)]
[qemu patches] Update patches upto changeset 15040:
090ca10cb543.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Christian Limpach [Fri, 11 May 2007 09:06:19 +0000 (10:06 +0100)]
[qemu] Fix ia64 after removal of ia64_intrinsic.h.
From: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Keir Fraser [Thu, 10 May 2007 22:49:04 +0000 (23:49 +0100)]
svm: Rationalise register synchronisation to be similar to our vmx
handling.
1. Do not copy all VMCB register state in cpu_user_regs on every
vmexit.
2. Save/restore RAX inside asm stub (in particular, before STGI on
vmexit).
3. Simplify store/load_cpu_guest_regs() hook functions to synchronise
precisely the same state as VMX.
By my measurements this reduces the round-trip latency for a null
hypercall by around 150 cycles. This is about 3% of the ~5000-cycle
total on my AMD X2 system. Not a great win, but a nice extra on top of
the code rationalisation.
Alex Williamson [Thu, 10 May 2007 21:55:22 +0000 (15:55 -0600)]
[IA64] Implement XENMEM_machine_memory_map on ia64.
This is necessary for kexec/kdump for xen/ia64. kexec-tools needs to know
real machine's memory map.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 10 May 2007 21:54:43 +0000 (22:54 +0100)]
xen: Some cleanups for x86 start of day.
1. Remove erroneous modification to e820.c
2. Make sure Xen is relocated as high as possible below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>